/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source code is subject to terms and conditions of the Shared Source License
* for DSL Editor PowerToy. A copy of the license can be found in the License.htm file
* at the root of this distribution. If you can not locate the Shared Source License
* for DSL Editor PowerToy, please obtain a copy from: http://www.codeplex.com/dsltreegrideditor/Project/License.aspx.
* By using this source code in any fashion, you are agreeing to be bound by
* the terms of the Shared Source License for DSL Editor PowerToy.
*
* You must not remove this notice, or any other, from this software.
*
* **********************************************************************************/
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Globalization;
using System.Resources;
using System.Text;
using System.Windows.Forms;

namespace DslEditorPowerToy.Controls.Editors.Special.DomainModelTreeGrid
{
    internal static class BranchItemGlyphs
    {
        private static ImageList _imageList = null;

        #region Public Properties
        /// <summary>
        /// Returns the image list
        /// instance is a singleton
        /// </summary>
        public static ImageList ImageList
        {
            get
            {
                if (_imageList == null)
                {
                    //Populate ImageList
                    Bitmap bitmap = BranchResources.Glyphs;
                    Color transparentColor = Color.FromArgb(255, 0, 255);
                    bitmap.MakeTransparent(transparentColor);
                    _imageList = new ImageList();
                    _imageList.TransparentColor = transparentColor;
                    _imageList.ImageSize = new Size(bitmap.Height, bitmap.Height);
                    _imageList.ColorDepth = ColorDepth.Depth24Bit;
                    _imageList.Images.AddStrip(bitmap);
                }

                return _imageList;
            }
        }

        #endregion

        #region Public Fields
        public const short DomainModel = 0;
        public const short DomainClass = 1;
        public const short DomainRelationship = 2;
        public const short DomainProperty = 3;

        #endregion
    }
}
